// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_SALES_PROD_PLAN_APPLICATION_ITEM
// * CreateDate    : 2012-1-2 10:45:49
// * Creater       : CodeSmith
// * LastChangeDate: 2012-1-2 10:45:49
// * LastChanger   : 2012-1-2 10:45:49
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
    [Serializable]
    public partial class SalesProdPlanApplicationItemEntity : EntityBase
    {
        public SalesProdPlanApplicationItemTable TableSchema
        {
            get
            {
                return SalesProdPlanApplicationItemTable.Current;
            }
        }

        public SalesProdPlanApplicationItemEntity()
        {

        }

        public SalesProdPlanApplicationItemEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.ApplicationItemId = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_ITEM_ID"]));
            this.ApplicationId = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_ID"]));
            this.ContactId = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_ID"]));
            this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
            this.RequiredDeliveryDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["REQUIRED_DELIVERY_DATE"]));
            this.LocationCode = Convert.ToString(CommonFunctions.ToObject(dr["LOCATION_CODE"]));
            this.Qty = Convert.ToDecimal(CommonFunctions.ToObject(dr["QTY"]));
            this.Price = Convert.ToDecimal(CommonFunctions.ToObject(dr["PRICE"]));
            this.PriceType = Convert.ToString(CommonFunctions.ToObject(dr["PRICE_TYPE"]));
            this.ProductType = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_TYPE"]));
            this.BlueprintStartDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["BLUEPRINT_START_DATE"]));
            this.BlueprintEndDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["BLUEPRINT_END_DATE"]));
            this.PackageType = Convert.ToString(CommonFunctions.ToObject(dr["PACKAGE_TYPE"]));
            this.CheckingType = Convert.ToString(CommonFunctions.ToObject(dr["CHECKING_TYPE"]));
            this.PrintBrand = Convert.ToInt32(CommonFunctions.ToObject(dr["PRINT_BRAND"]));
            this.IsFinished = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_FINISHED"]));
            this.DeliveryApplication = Convert.ToString(CommonFunctions.ToObject(dr["DELIVERY_APPLICATION"]));
            this.DeliveryQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["DELIVERY_QTY"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
            this.ProductSpecIn = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_SPEC_IN"]));
            this.ProductSpecOut = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_SPEC_OUT"]));
            this.Material = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL"]));
            this.DiameterOut = Convert.ToDecimal(CommonFunctions.ToObject(dr["DIAMETER_OUT"]));
            this.DiameterIn = Convert.ToDecimal(CommonFunctions.ToObject(dr["DIAMETER_IN"]));
            this.Length = Convert.ToDecimal(CommonFunctions.ToObject(dr["LENGTH"]));
            this.Unit = Convert.ToString(CommonFunctions.ToObject(dr["UNIT"]));
            this.OrderItemId = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_ITEM_ID"]));
            this.RegisterItemId = Convert.ToString(CommonFunctions.ToObject(dr["REGISTER_ITEM_ID"]));
        }

        public SalesProdPlanApplicationItemEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.ApplicationItemId = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_ITEM_ID"]));
            this.ApplicationId = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_ID"]));
            this.ContactId = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_ID"]));
            this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
            this.RequiredDeliveryDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["REQUIRED_DELIVERY_DATE"]));
            this.LocationCode = Convert.ToString(CommonFunctions.ToObject(dr["LOCATION_CODE"]));
            this.Qty = Convert.ToDecimal(CommonFunctions.ToObject(dr["QTY"]));
            this.Price = Convert.ToDecimal(CommonFunctions.ToObject(dr["PRICE"]));
            this.PriceType = Convert.ToString(CommonFunctions.ToObject(dr["PRICE_TYPE"]));
            this.ProductType = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_TYPE"]));
            this.BlueprintStartDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["BLUEPRINT_START_DATE"]));
            this.BlueprintEndDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["BLUEPRINT_END_DATE"]));
            this.PackageType = Convert.ToString(CommonFunctions.ToObject(dr["PACKAGE_TYPE"]));
            this.CheckingType = Convert.ToString(CommonFunctions.ToObject(dr["CHECKING_TYPE"]));
            this.PrintBrand = Convert.ToInt32(CommonFunctions.ToObject(dr["PRINT_BRAND"]));
            this.IsFinished = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_FINISHED"]));
            this.DeliveryApplication = Convert.ToString(CommonFunctions.ToObject(dr["DELIVERY_APPLICATION"]));
            this.DeliveryQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["DELIVERY_QTY"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
            this.ProductSpecIn = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_SPEC_IN"]));
            this.ProductSpecOut = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_SPEC_OUT"]));
            this.Material = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL"]));
            this.DiameterOut = Convert.ToDecimal(CommonFunctions.ToObject(dr["DIAMETER_OUT"]));
            this.DiameterIn = Convert.ToDecimal(CommonFunctions.ToObject(dr["DIAMETER_IN"]));
            this.Length = Convert.ToDecimal(CommonFunctions.ToObject(dr["LENGTH"]));
            this.Unit = Convert.ToString(CommonFunctions.ToObject(dr["UNIT"]));
            this.OrderItemId = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_ITEM_ID"]));
            this.RegisterItemId = Convert.ToString(CommonFunctions.ToObject(dr["REGISTER_ITEM_ID"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return SalesProdPlanApplicationItemTable.Current;
            }
        }

        #region Perporty List
        public string ApplicationItemId
        {
            get { return Convert.ToString(GetData(SalesProdPlanApplicationItemTable.C_APPLICATION_ITEM_ID)); }
            set { SetData(SalesProdPlanApplicationItemTable.C_APPLICATION_ITEM_ID, value); }
        }

        public string ApplicationId
        {
            get { return Convert.ToString(GetData(SalesProdPlanApplicationItemTable.C_APPLICATION_ID)); }
            set { SetData(SalesProdPlanApplicationItemTable.C_APPLICATION_ID, value); }
        }

        public string ContactId
        {
            get { return Convert.ToString(GetData(SalesProdPlanApplicationItemTable.C_CONTACT_ID)); }
            set { SetData(SalesProdPlanApplicationItemTable.C_CONTACT_ID, value); }
        }

        public string ProductId
        {
            get { return Convert.ToString(GetData(SalesProdPlanApplicationItemTable.C_PRODUCT_ID)); }
            set { SetData(SalesProdPlanApplicationItemTable.C_PRODUCT_ID, value); }
        }

        public DateTime RequiredDeliveryDate
        {
            get { return Convert.ToDateTime(GetData(SalesProdPlanApplicationItemTable.C_REQUIRED_DELIVERY_DATE)); }
            set { SetData(SalesProdPlanApplicationItemTable.C_REQUIRED_DELIVERY_DATE, value); }
        }

        public string LocationCode
        {
            get { return Convert.ToString(GetData(SalesProdPlanApplicationItemTable.C_LOCATION_CODE)); }
            set { SetData(SalesProdPlanApplicationItemTable.C_LOCATION_CODE, value); }
        }

        public decimal Qty
        {
            get { return Convert.ToDecimal(GetData(SalesProdPlanApplicationItemTable.C_QTY)); }
            set { SetData(SalesProdPlanApplicationItemTable.C_QTY, value); }
        }

        public decimal Price
        {
            get { return Convert.ToDecimal(GetData(SalesProdPlanApplicationItemTable.C_PRICE)); }
            set { SetData(SalesProdPlanApplicationItemTable.C_PRICE, value); }
        }

        public string PriceType
        {
            get { return Convert.ToString(GetData(SalesProdPlanApplicationItemTable.C_PRICE_TYPE)); }
            set { SetData(SalesProdPlanApplicationItemTable.C_PRICE_TYPE, value); }
        }

        public string ProductType
        {
            get { return Convert.ToString(GetData(SalesProdPlanApplicationItemTable.C_PRODUCT_TYPE)); }
            set { SetData(SalesProdPlanApplicationItemTable.C_PRODUCT_TYPE, value); }
        }

        public DateTime BlueprintStartDate
        {
            get { return Convert.ToDateTime(GetData(SalesProdPlanApplicationItemTable.C_BLUEPRINT_START_DATE)); }
            set { SetData(SalesProdPlanApplicationItemTable.C_BLUEPRINT_START_DATE, value); }
        }

        public DateTime BlueprintEndDate
        {
            get { return Convert.ToDateTime(GetData(SalesProdPlanApplicationItemTable.C_BLUEPRINT_END_DATE)); }
            set { SetData(SalesProdPlanApplicationItemTable.C_BLUEPRINT_END_DATE, value); }
        }

        public string PackageType
        {
            get { return Convert.ToString(GetData(SalesProdPlanApplicationItemTable.C_PACKAGE_TYPE)); }
            set { SetData(SalesProdPlanApplicationItemTable.C_PACKAGE_TYPE, value); }
        }

        public string CheckingType
        {
            get { return Convert.ToString(GetData(SalesProdPlanApplicationItemTable.C_CHECKING_TYPE)); }
            set { SetData(SalesProdPlanApplicationItemTable.C_CHECKING_TYPE, value); }
        }

        public int PrintBrand
        {
            get { return Convert.ToInt32(GetData(SalesProdPlanApplicationItemTable.C_PRINT_BRAND)); }
            set { SetData(SalesProdPlanApplicationItemTable.C_PRINT_BRAND, value); }
        }

        public int IsFinished
        {
            get { return Convert.ToInt32(GetData(SalesProdPlanApplicationItemTable.C_IS_FINISHED)); }
            set { SetData(SalesProdPlanApplicationItemTable.C_IS_FINISHED, value); }
        }

        public string DeliveryApplication
        {
            get { return Convert.ToString(GetData(SalesProdPlanApplicationItemTable.C_DELIVERY_APPLICATION)); }
            set { SetData(SalesProdPlanApplicationItemTable.C_DELIVERY_APPLICATION, value); }
        }

        public decimal DeliveryQty
        {
            get { return Convert.ToDecimal(GetData(SalesProdPlanApplicationItemTable.C_DELIVERY_QTY)); }
            set { SetData(SalesProdPlanApplicationItemTable.C_DELIVERY_QTY, value); }
        }

        public string Status
        {
            get { return Convert.ToString(GetData(SalesProdPlanApplicationItemTable.C_STATUS)); }
            set { SetData(SalesProdPlanApplicationItemTable.C_STATUS, value); }
        }

        public string Remark
        {
            get { return Convert.ToString(GetData(SalesProdPlanApplicationItemTable.C_REMARK)); }
            set { SetData(SalesProdPlanApplicationItemTable.C_REMARK, value); }
        }

        public string ProductSpecIn
        {
            get { return Convert.ToString(GetData(SalesProdPlanApplicationItemTable.C_PRODUCT_SPEC_IN)); }
            set { SetData(SalesProdPlanApplicationItemTable.C_PRODUCT_SPEC_IN, value); }
        }

        public string ProductSpecOut
        {
            get { return Convert.ToString(GetData(SalesProdPlanApplicationItemTable.C_PRODUCT_SPEC_OUT)); }
            set { SetData(SalesProdPlanApplicationItemTable.C_PRODUCT_SPEC_OUT, value); }
        }

        public string Material
        {
            get { return Convert.ToString(GetData(SalesProdPlanApplicationItemTable.C_MATERIAL)); }
            set { SetData(SalesProdPlanApplicationItemTable.C_MATERIAL, value); }
        }

        public decimal DiameterOut
        {
            get { return Convert.ToDecimal(GetData(SalesProdPlanApplicationItemTable.C_DIAMETER_OUT)); }
            set { SetData(SalesProdPlanApplicationItemTable.C_DIAMETER_OUT, value); }
        }

        public decimal DiameterIn
        {
            get { return Convert.ToDecimal(GetData(SalesProdPlanApplicationItemTable.C_DIAMETER_IN)); }
            set { SetData(SalesProdPlanApplicationItemTable.C_DIAMETER_IN, value); }
        }

        public decimal Length
        {
            get { return Convert.ToDecimal(GetData(SalesProdPlanApplicationItemTable.C_LENGTH)); }
            set { SetData(SalesProdPlanApplicationItemTable.C_LENGTH, value); }
        }

        public string Unit
        {
            get { return Convert.ToString(GetData(SalesProdPlanApplicationItemTable.C_UNIT)); }
            set { SetData(SalesProdPlanApplicationItemTable.C_UNIT, value); }
        }

        public string OrderItemId
        {
            get { return Convert.ToString(GetData(SalesProdPlanApplicationItemTable.C_ORDER_ITEM_ID)); }
            set { SetData(SalesProdPlanApplicationItemTable.C_ORDER_ITEM_ID, value); }
        }

        public string RegisterItemId
        {
            get { return Convert.ToString(GetData(SalesProdPlanApplicationItemTable.C_REGISTER_ITEM_ID)); }
            set { SetData(SalesProdPlanApplicationItemTable.C_REGISTER_ITEM_ID, value); }
        }

        #endregion

       
    }


}